package com.servlet2; /**
 * @author wzm
 * @create 2023-04-25 15:38
 */

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
//urlPatterns 表示的是servlet访问的路径
//1.配置一个路径 表示当访问当前项目该路径会执行此Servlet
//@WebServlet(urlPatterns = "/servlet03")
//@WebServlet("/servlet03")

//2.配置多个访问路径
//@WebServlet(urlPatterns = {"/s001","/s002"})

//3.精确匹配 当不同的Servlet访问路径相同可以+一个路径匹配不同的操作
//@WebServlet(urlPatterns = "/student/getAll")

//4.目录匹配只要是/student下任何请求都会被Servlet接收到
//@WebServlet(urlPatterns = "/student/*")

//5.扩展名匹配
//@WebServlet(urlPatterns = "*.do")

//6.任意匹配 所有请求都会匹配
//@WebServlet("/*")
public class Servlet03 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("访问");

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
